import axios from 'axios'
import { apiBase } from '@config/host'
import { project } from '@config/urls'

const headers = {
  'userid': 'oMIXe0XEDiQ3jAkiPPjSJkK6BpUY',
  'dpmid': '1'
}

// 获取项目列表
const getProjectList = function (data) {
  return new Promise((resolve, reject) => {
    axios.get(apiBase + project.getProjectList, {
      params: data,
      headers
    }).then(res => {
      resolve && resolve(res.data)
    }).catch(errMsg => {
      reject && reject(errMsg)
    })
  })
}

export {
  getProjectList
}